//
//  Extension+UIImageView.swift
//  WBBeta1
//
//  Created by wustzhy on 16/8/10.
//  Copyright © 2016年 Yestin. All rights reserved.
//

import UIKit
import SDWebImage


extension UIImageView{
    //便利
    convenience init(imgName:String){
        self.init(image: UIImage(named: imgName))
    }
    
//    func zy_set
    func zy_setImageWithString(imgName: String?,placeholderImgName: String){
      
                self.sd_setImageWithURL(NSURL(string: imgName ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }
    
//            img.sd_setImageWithURL(NSURL(string: ZYUserAccountViewModel.sharedTools.userAccount?.avatar_large ?? ""), placeholderImage: UIImage(named: "avatar_default_big"))
    
    
    
    
}


//init(image: UIImage(named: imgName)) 为指定的，已有的


//UIImageView(image: UIImage(named:"visitordiscover_feed_image_smallicon"))